aux_source_directory(. dir_source)
aux_source_directory(./StreamInManage subdir_source)
aux_source_directory(./WrapperMethod subdir_source2)
aux_source_directory(./App subdir_source3)
aux_source_directory(./SocketCommunication subdir_source4)
aux_source_directory(./DeviceInfoManager subdir_source5)
aux_source_directory(./Gui subdir_source6)

include_directories(./)
include_directories(../include)
include_directories(../include/log)
include_directories(../include/md5)
include_directories(../include/hid)
include_directories(../include/zlib/minizip)
include_directories(../include/zlib/zlib)
include_directories(../include/pin)
include_directories(../include/jsoncpp)
include_directories(../include/frame_common)
include_directories(../include/yuv)
include_directories(../include/jpeg-turbo)
include_directories(../include/ScreenMirror)
include_directories(../include/kafka)
include_directories(../include/openssl)
include_directories(../include/lvgl)
include_directories(../include/ffmpeg)

include_directories(../depModules)
include_directories(../depModules/Pal)
include_directories(../depModules/Uvc)
include_directories(../depModules/Usbstream)
include_directories(../depModules/Mdns)
include_directories(../depModules/Foundation)
include_directories(../depModules/MagicBox)


include_directories(./StreamInManage)
include_directories(./WrapperMethod)
include_directories(./App)
include_directories(./SocketCommunication)
include_directories(./DeviceInfoManager)
include_directories(../public)

set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)
message(STATUS "LIBRARY_OUTPUT_PATH : ${LIBRARY_OUTPUT_PATH}")

#exec_program(svn ARGS "info ${PROJECT_SOURCE_DIR} | grep Revision: | awk '{print $2}'" OUTPUT_VARIABLE SVN_NUM)
set(SVN_NUM "567")
message(STATUS "SVN_NUM : ${SVN_NUM}")

set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DLOG_MODULE_NAME='\"${LIB_NAME}\"' -DSVN_NUM=${SVN_NUM}")
message(STATUS "CFLAGS : ${CMAKE_C_FLAGS}")

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DLOG_MODULE_NAME='\"${LIB_NAME}\"' -DSVN_NUM=${SVN_NUM} -fpermissive")
message(STATUS "CXXFLAGS : ${CMAKE_CXX_FLAGS}")
add_library(${LIB_NAME} STATIC ${dir_source} ${subdir_source} ${subdir_source2} 
        ${subdir_source3} ${subdir_source4} ${subdir_source5} ${subdir_source6})
